package com.nov.multidatasource.config.store;

import com.nov.multidatasource.config.RunBatchConfig;
import com.obs.services.ObsClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @ClassName OBSClientConfig
 * @Description TODO
 * @Author cxn
 * @CreateTime 2025/1/14 10:13
 * @Since 1.0.0
 */
@Configuration
@Slf4j
public class OBSClientConfig {

    @Resource
   private RunBatchConfig runBatchConfig;

    /**
     * 华为存储OBS
     */
    @Bean
    public ObsClient oBSClient() {
        return new ObsClient(runBatchConfig.getObsAccessKey(), runBatchConfig.getObsSecretKey(), runBatchConfig.getObsEndPoint());
    }
}
